/*

Author   : chaos

FileName : call_con_pro.cpp

Date     : 14/08/17 10:35:30

*/
#include <iostream>
using namespace std;

class A
{
    public:
        A()
            { cout << "A's constructor is called !" << endl; }
        A(int a)
        { cout<< "A's 1-parameter constructor is called !" << endl; }
        ~A()
        {
            cout << "A's destructor is called !!" << endl;
        }
};

class B:public A
{
    public:
        B()
        { cout << "B's consstructor is called !" << endl; }
        ~B()
        {
            cout << "B's destructor is called !" << endl;
        }
};

class C:public B
{
    public:
        C()
        { cout << "C's constructor is called !" << endl; }
        ~C()
        {
            cout << "C's destructor is called !" << endl;
        }
};

int main(int argc ,char *argv[])
{
    cout << "To declare C_object ......" << endl;
    C * C_object = new C;

    cout << endl << "To delete C_object ......" << endl;
    delete C_object;

    return 0;
}
